package org.codeart.pattern.chainresponsibility.authority;

public class MemberService {

    public static void main(String[] args) {
        MemberService service = new MemberService();
        service.login("tom", "666");
    }

    public void login(String loginName, String loginPass) {
        Handler.<Member>builder()
               .addHandler(new ValidateHandler())
               .addHandler(new LoginHandler())
               .addHandler(new AuthHandler())
               .build()
               .doHandle(new Member(loginName, loginPass));
    }

}
